package com.data.common.util.jsonschema.validate;

import com.alibaba.fastjson.JSONObject;
import java.util.HashMap;
import java.util.Map;
import com.data.common.util.jsonschema.CommonProperty;
import com.data.modules.online.cgform.util.CgformUtil;
import com.data.modules.online.config.executor.DataBaseConst;

public class TreeSelectProperty extends CommonProperty {

    private static final long f46l = 3786503639885610767L;

    private String f47m;

    private String f48n;

    private String f49o;

    private String f50p;

    private String f51q;

    private Integer f52r;

    public String getDict() {
        return this.f47m;
    }

    public void setDict(String dict) {
        this.f47m = dict;
    }

    public String getPidField() {
        return this.f48n;
    }

    public void setPidField(String pidField) {
        this.f48n = pidField;
    }

    public String getPidValue() {
        return this.f49o;
    }

    public void setPidValue(String pidValue) {
        this.f49o = pidValue;
    }

    public String getHasChildField() {
        return this.f50p;
    }

    public void setHasChildField(String hasChildField) {
        this.f50p = hasChildField;
    }

    public TreeSelectProperty() {
        this.f52r = 0;
    }

    public String getTextField() {
        return this.f51q;
    }

    public void setTextField(String textField) {
        this.f51q = textField;
    }

    public Integer getPidComponent() {
        return this.f52r;
    }

    public void setPidComponent(Integer pidComponent) {
        this.f52r = pidComponent;
    }

    public TreeSelectProperty(String key, String title, String dict, String pidField, String pidValue) {
        this.f52r = 0;
        this.f2b = DataBaseConst.f474i;
        this.f5e = CgformUtil.f243Q;
        this.f1a = key;
        this.f6f = title;
        this.f47m = dict;
        this.f48n = pidField;
        this.f49o = pidValue;
    }

    public TreeSelectProperty(String key, String title, String pidValue) {
        this.f52r = 0;
        this.f2b = DataBaseConst.f474i;
        this.f5e = CgformUtil.f244R;
        this.f1a = key;
        this.f6f = title;
        this.f49o = pidValue;
    }

    public TreeSelectProperty(String key, String title, String pidValue, String textField) {
        this(key, title, pidValue);
        this.f51q = textField;
    }

    @Override
    public Map<String, Object> getPropertyJson() {
        HashMap hashMap = new HashMap();
        hashMap.put("key", getKey());
        JSONObject commonJson = getCommonJson();
        if (this.f47m != null) {
            commonJson.put("dict", this.f47m);
        }
        if (this.f48n != null) {
            commonJson.put("pidField", this.f48n);
        }
        if (this.f49o != null) {
            commonJson.put("pidValue", this.f49o);
        }
        if (this.f51q != null) {
            commonJson.put("textField", this.f51q);
        }
        if (this.f50p != null) {
            commonJson.put("hasChildField", this.f50p);
        }
        if (this.f52r != null) {
            commonJson.put("pidComponent", this.f52r);
        }
        hashMap.put("prop", commonJson);
        return hashMap;
    }
}
